import { ConfigProvider } from "antd";
import zhCN from "antd/lib/locale/zh_CN";
import enUS from "antd/lib/locale/en_US";

import { useAppSelector } from "@/app/hooks";
import { selectLang } from "@/app/appSlice";

import { useAppRoutes } from "./routes";
import routes from "./routes"

function App() {
  const lang = useAppSelector(selectLang);

  // console.log(item.auth,131313)
  // if(!item.auth){
    return (
      <ConfigProvider locale={lang === "zh_CN" ? zhCN : enUS}>
        {useAppRoutes()}
      </ConfigProvider>
    );

}

export default App;
